package cn.itcast.hotel.controller;

import cn.itcast.hotel.pojo.PageResult;
import cn.itcast.hotel.pojo.RequestParams;
import cn.itcast.hotel.service.impl.HotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：xiaoZhou
 * @ClassName : HotelController
 * @date ：Created in 2021/12/17 19:10
 */
@Controller
@ResponseBody
@RequestMapping("/hotel")
public class HotelController {

    @Autowired
    private HotelService hotelService;


    @PostMapping("/list")
    public PageResult list(@RequestBody RequestParams requestParams){
        return hotelService.search(requestParams);
    }







}
